import sqlite3

conn = sqlite3.connect('testdb')

cursor = conn.cursor()

query = "SELECT * FROM testdb"
cursor.execute(query)
names = [f[0] for f in cursor.description]
for row in cursor.fetchall() :
    for pair in zip(names,row):
        print("%s : %s " % pair)
    print()

cursor.close()
conn.close()